function gcd(p, q: longint): longint;
begin
  while p <> q do 
    if p > q then p := p - q
    else q := q - p;
  gcd := p;
end;

var
  x, y, z, a, b, c, i, k, d: longint;
  s, s1, s2, s3: string;

begin
  readln(s);
  i := 1;
  while (ord('0') <= ord(s[i])) and (ord(s[i]) <= ord('9')) do inc(i);
  s1 := copy(s, 1, i - 1);
  delete(s, 1, i - 1);
  while not ((ord('0') <= ord(s[1])) and (ord(s[1]) <= ord('9'))) do delete(s, 1, 1);
  i := 1;
  while (ord('0') <= ord(s[i])) and (ord(s[i]) <= ord('9')) do inc(i);
  s2 := copy(s, 1, i - 1);
  delete(s, 1, i - 1);
  while not ((ord('0') <= ord(s[1])) and (ord(s[1]) <= ord('9'))) do delete(s, 1, 1);
  s3 := s;
  val(s1, x, k);
  val(s2, y, k);
  val(s3, z, k);
  a := y + z;
  b := x + z;
  c := x + y;
  d := gcd(gcd(a, b), c);
  a := a div d;
  b := b div d;
  c := c div d;
  if (a <= b) and (b <= c) then writeln(a, ' : ', b, ' : ', c)
  else if (a <= c) and (c <= b) then writeln(a, ' : ', c, ' : ', b)
  else if (b <= a) and (a <= c) then writeln(b, ' : ', a, ' : ', c)
  else if (b <= c) and (c <= a) then writeln(b, ' : ', c, ' : ', a)
  else if (c <= a) and (a <= b) then writeln(c, ' : ', a, ' : ', b)
  else if (c <= b) and (b <= a) then writeln(c, ' : ', b, ' : ', a)
end.